# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=valadoc
pkgver=0.36.2
pkgrel=1
epoch=1
pkgdesc="A documentation tool for vala"
arch=(x86_64)
url="https://git.gnome.org/browse/valadoc"
license=(GPL2)
depends=(vala gtk-doc graphviz libgee ttf-dejavu)
makedepends=(git)
_commit=b2172f45ee815d4575fd3c6f75cafe035cc26224  # tags/0.36.2^0
source=("git+https://git.gnome.org/browse/valadoc#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
